Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

364
Vistas
Url redirects you too many times using Cypress Invoke("removeAttr", "target") command

I'm using this code to handle new tab and getting this error. It's displaying chrome-error //chromewebdata/ in url.

Tried for few other example site and it's working fine. I think mine url is redirecting two times that why facing this issue "redirected too many time". How I can handle it?

cy.get(".store-list-item__action").contains("a","Log in").eq(0).invoke("removeAttr", 'target').then(newUrl=>{
        cy.wrap(newUrl).click()
    })

enter image description here

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

How about you just use this:

cy.contains('a', 'Log in').invoke("removeAttr", 'target').click()
about 4 years ago · Juan Pablo Isaza Denunciar

0

.invoke("removeAttr", 'target')

Above Command will work only if system is moving user to same "href" link, in this case after clicking the link systemis redirecting user to another page/link which cypress doesn't support. So cy.request() method can be used for this scenario to validate data.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda